#ifndef _HUF
#include <stdio.h>
#endif
typedef struct __HufTree {
	unsigned flag : 1;
	unsigned char alpha;
	unsigned long long int count;
	struct __HufTree * top;
	struct __HufTree * left;
	struct __HufTree * right;
} __HufTree;

// file header struct
typedef struct fileHead {
	size_t sizeName; 
	char * fileName;
	unsigned long long int mtime;
	unsigned long long int fileSize;
	size_t huff_ubits;
	// useless bits in coding file
	size_t huff_block;
	// size of block with information about codes
	unsigned long long int huff_file_len;
	short int rplFlag;
	__HufTree * HufTree;
	// useful flags which uses in differet functions
} fileHead;

//environment
typedef struct _env {
	FILE * old_arc;
	FILE * new_arc;
	FILE * fileToRead;
	FILE * fileToWrite;
	FILE * tmpFile_1;
	FILE * tmpFile_2;
	char ** fileNames;
	char * tmpFileName;
	char * tmpFileName_2;
	__HufTree  * HufTree;
	fileHead * fileHd;
	fileHead ** list;

} _env;

typedef struct str_inf {
	size_t pos;
	size_t len;
	size_t ind_bits;
	size_t ind_char;
	size_t u_bits;
} str_inf;